
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<link href="css/css.css" rel="stylesheet" type="text/css">
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="lib/jquery.validate.js" type="text/javascript"></script>
<script src="localization/messages_cn.js" charset="UTF-8"
	type="text/javascript"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		alert("使用须知：用户名必须是数字和字母，长度在4-15位，所有字段均不能为空，两次输入的密码必须相同，并在使用过程中遵守五人行团队制定的相关制度");
		//字母数字
		jQuery.validator.addMethod("alnum", function(value, element) {
			return this.optional(element) || /^[a-zA-Z0-9]+$/.test(value);
		}, "只能包括英文字母和数字");

		$("#myform").validate({
			rules : {
				username : {
					"required" : true,
					"alnum" : true
				},
				 password: {
					    required: true,
					    minlength: 5
					   },
					   passwordtwo: {
					    required: true,
					    minlength: 5,
					    equalTo: "#password"
					   }

			}
		})
	});
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>五人行博客</title>
</head>
<body><div id="desktop">
<img src="img/bg.jpg" id="bgimage"/>

<div id="bgtop" class="transparent_class"></div>
<div id="center" class="transparent_class"><br> <br> <br> <br> <br> <br> <br>
		<h1><a href='welcome.jsp'><<返回欢迎页面</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;注册</h1><div id="content">
		<form action="registerServlet" method="post" id="myform">
			<br> <br>
			<p>
				用&nbsp;&nbsp;户&nbsp;&nbsp;名：<input type="text" id="username"
					name="username" /> <br> <br>
			<p>
				邮箱地址：<input type="text" id="email" name="email" /> <br> <br>
			<p>
				登录密码：<input type="password" id="password" name="password" /><span
					style="color: #F00">*</span> <br> <br>
			<p>
				确认密码：<input type="password" id="passwordtwo" name="passwordtwo" /><span
					style="color: #F00">*</span> <br> <br>
			<p>
				性&nbsp;&nbsp;别：
				<select id="sex" name="sex">
					<option value="男">男</option>
					<option value="女">女</option>
				</select>
				
				
				<br> <br>
				<p>
				爱&nbsp;&nbsp;好：<input type="text" id="habby" name="habby" /> <br> <br>
			<p>
				博客昵称：<input type="text" id="nickname" name="nickname" /><br /> <br>
				<br> <input type="submit" value="注册">
		</form></div></div>

	
<div id="bgbottom" class="transparent_class"></div>

</body>
</html>